# while循环

xSum = 0
i = 1000
while i < 100:
    print(i)
    i = i + 1
    xSum += i
print("累加和:%d" % xSum)

# for循环 for字符串
str2 = "123456"
for i in str2:
    print(i)
# for range
for i in range(10):
    print("range遍历 %d" % i)
for i in range(3, 5):
    print("range范围遍历 %d" % i)
for i in range(1, 10, 3):
    print("步长为 %d" % i)

for i in range(10):
    for j in range(10):
        if i % 2 != 0:
            break
        print("*", end=' ')
    print("")

# for else
str3 = "hello python"
for i in str3:
    if i == 'p':
        print(i)
        break
else:
    print("不包含")

for x in range(10):
    print("*" * x)
